home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 May: Tool Chest / Developer CD Series Tool Chest (Apple Computer)(May 1999).iso / Tool Chest / Communications Toolbox / CTB Development Resources / Simple FT Tool / Simon Tool / MakeFile < prev    next >
Encoding:
Makefile  |  1992-05-12  |  12.8 KB  |  420 lines  |  [TEXT/MPS ]

  1. ###############################################################################
  2. ##
  3. ##  Project Name:    Generic makefile
  4. ##     File Name:    MakeFile
  5. ##
  6. ##   Description:    This file will build our project
  7. ##     
  8. ##                      Copyright © 1992 Apple Computer, Inc.
  9. ##                      All rights reserved.
  10. ##
  11. ###############################################################################
  12. ##                       A U T H O R   I D E N T I T Y
  13. ###############################################################################
  14. ##
  15. ##    Initials    Name
  16. ##    --------    -----------------------------------------------
  17. ##    CH            Craig Hotchkiss
  18. ##
  19. ###############################################################################
  20. ##                      R E V I S I O N   H I S T O R Y
  21. ###############################################################################
  22. #
  23. #    Change History (most recent first):
  24. #
  25. #         <0>      5/8/92    CH        Creation date.
  26. #
  27. ###############################################################################
  28.  
  29.  
  30. #    Using this project name with the BuildProgram script will cause a 
  31. #        complete build.
  32. ProjectName =                    "Simon Tool"
  33.  
  34.  
  35. #    This constant file is common between the Rez sources and the C files.
  36. #        The BaseResID integer is passed here and is the basis for all 
  37. #        resource numbering.
  38. ConstantFileNm =                 "Constants.h"
  39. BaseResID =                     400
  40.  
  41.  
  42. #    This file is the name of a Resedit file containing most of the 
  43. #        pre-built resources for the tool.
  44. PrebuiltFileNm =                 "Resources.rsrc"
  45.  
  46.  
  47. ObjectFolder =                     ":Objects:"
  48. SymbolOption =                     off
  49. MacsBugOption =                 full
  50. CDumpFileName =                 "Load.Dump"
  51.  
  52.  
  53. CTBLibraryDir =                    "{Libraries}"
  54. CTBLibraries =                     {CTBLibraryDir}CommToolboxExtensions.o
  55.  
  56.  
  57.  
  58. #---------------------------------------------------------------------------
  59. #    start standard preamble
  60. #    compiler options
  61.  
  62. COPTIONS =                                                                     ∂
  63.                 #-p                                                         ∂
  64.                 -d Debugging=1                                                ∂
  65.                 -d DefaultDebug=1                                            ∂
  66.                 -d OSErrDebug=1                                                ∂
  67.                 -d PrefsDebug=0                                                ∂
  68.                 -d ShowDefaults=1                                            ∂
  69.                 -d ShowMessage=1                                            ∂
  70.                 -d BaseResNumber={BaseResID}                                ∂
  71.                 -d DUMPFILENAME=∂"{CDumpFileName}∂"                            ∂
  72.                 -sym {SYMBOLOPTION}                                         ∂
  73.                 -b3                                                            ∂
  74.                 -r                                                             ∂
  75.                 -warnings on                                                ∂
  76.                 -mbg {MacsBugOption}                                         ∂
  77.                 -i ":"                                                         ∂
  78.                 -k {ObjectFolder}
  79.  
  80. POPTIONS =                                                                     ∂
  81.                 #-p                                                            ∂
  82.                 -d Debugging=TRUE                                             ∂
  83.                 -sym {SYMBOLOPTION}                                         ∂
  84.                 -mbg {MacsBugOption}                                         ∂
  85.                 -u                                                             ∂
  86.                 -sym {SYMBOLOPTION}
  87.  
  88. AOPTIONS =                                                                     ∂
  89.                 #-p                                                            ∂
  90.                 -d Debugging=1                                                ∂
  91.                 -sym {SYMBOLOPTION}
  92.  
  93. LINKOPTIONS =                                                                 ∂
  94.                 #-p                                                            ∂
  95.                 -w                                                             ∂
  96.                 -sym {SYMBOLOPTION}                                         ∂
  97.                 -mf
  98.  
  99. LIBOPTIONS =                                                                 ∂
  100.                 -sym {SYMBOLOPTION}
  101.         
  102. REZOPTIONS =                                                                 ∂
  103.                 #-p                                                            ∂
  104.                 -d Debugging=1                                                ∂
  105.                 -d BaseResNumber={BaseResID}                                ∂
  106.                 -d DUMPFILENAME=∂"{CDumpFileName}∂"                            ∂
  107.                 -d ObjectFolder=∂"{ObjectFolder}∂"                            ∂
  108.                 -d ConstantFileString=∂"{ConstantFileName}∂"                ∂
  109.                 -i ":"                                                         ∂
  110.                 -append
  111.  
  112. StandardDependencies =                                                        ∂
  113.                 {ObjectFolder}StandardLibrary                    
  114.  
  115. MacLibraries =                                                                ∂
  116.                 "{Libraries}"Stubs.o                                        ∂
  117.                 "{Libraries}"Interface.o                                    ∂
  118.                 "{Libraries}"Runtime.o                                        ∂
  119.                 "{CLibraries}"StdClib.o                                        ∂
  120.                 "{CLibraries}"Complex.o                                        ∂
  121.                 "{CLibraries}"CSANELib.o                                    ∂
  122.                 "{CLibraries}"Math.o                                        ∂
  123.                 "{Libraries}"ToolLibs.o                                        ∂
  124.                 "{PLibraries}SANELib.o"                                        ∂
  125.                 "{PLibraries}"PasLib.o
  126.         
  127. #    end standard preamble
  128. #---------------------------------------------------------------------------
  129.  
  130.  
  131.  
  132. ###############################################################################
  133. #                            Other dependecies
  134. ###############################################################################
  135. #
  136. {ObjectFolder}Validation.c.o            ƒ        Globals.h {ConstantFileNm}
  137.  
  138.  
  139.  
  140. ###############################################################################
  141. #                            FDEF build rules
  142. ###############################################################################
  143. FDEFEntrypoint =             FDEF
  144. FDEFDescription =            "Code-Main definition"
  145. FDEFResourceType =            fdef
  146. FDEFResourceID =            1
  147. #AttrChoices =                 "resSysHeap,resPurgeable,resLocked,resProtected,resPreload,resChanged"
  148. FDEFRsrcAttributes =         "resLocked"
  149. #
  150. #    This rule makes sure that the load gets compiled before the code
  151. {ObjectFolder}FDEF.c.o            ƒ        {ObjectFolder}Load.c.o Globals.h
  152. #
  153. #    NOTE - The entry point file must be first in this list.
  154. FDEFObjects =                                                                 ∂
  155.                             {ObjectFolder}FDEF.c.o                            ∂
  156.                             {ObjectFolder}Load.c.o
  157. FDEFDependencies =                                                            ∂
  158.                             MakeFile                                        ∂
  159.                             {FDEFObjects}                                    ∂
  160.                             {CTBLibraries}                                    ∂
  161.                             {StandardDependencies}
  162. #
  163. #
  164. {ProjectName}                ƒƒ        {FDEFDependencies}
  165.     Link {LINKOPTIONS}                                                         ∂
  166.         -rt {FDEFResourceType}={FDEFResourceID}                             ∂
  167.         -ra {FDEFDescription}={FDEFRsrcAttributes}                             ∂
  168.         -m {FDEFEntrypoint}                                                 ∂
  169.         -sg {FDEFDescription}                                                 ∂
  170.         {FDEFObjects}                                                         ∂
  171.         {CTBLibraries}                                                         ∂
  172.         {OBJECTFOLDER}StandardLibrary                                        ∂
  173.         -o {ProjectName}
  174.     #Beep D,5 G,1,0 G,5 G,1,0 B,5 G,1,0 1D,10 G,1,0 B,5 G,1,0 1D,10
  175.  
  176.  
  177. ###############################################################################
  178. #                            FLOC build rules
  179. ###############################################################################
  180. FLOCEntrypoint =             FLOC
  181. FLOCDescription =            "Code-Localization"
  182. FLOCResourceType =            floc
  183. FLOCResourceID =            1
  184. #AttrChoices =                 "resSysHeap,resPurgeable,resLocked,resProtected,resPreload,resChanged"
  185. FLOCRsrcAttributes =         "resLocked"
  186. #
  187. #    This rule makes sure that the load gets compiled before the code
  188. {ObjectFolder}FLOC.c.o            ƒ        {ObjectFolder}Load.c.o Globals.h
  189. #
  190. #    NOTE - The entry point file must be first in this list.
  191. FLOCObjects =                                                                 ∂
  192.                             {ObjectFolder}FLOC.c.o                            ∂
  193.                             {ObjectFolder}Load.c.o
  194. FLOCDependencies =                                                            ∂
  195.                             MakeFile                                        ∂
  196.                             {FLOCObjects}                                    ∂
  197.                             {CTBLibraries}                                    ∂
  198.                             {StandardDependencies}
  199. #
  200. #
  201. {ProjectName}                ƒƒ        {FLOCDependencies}
  202.     Link {LINKOPTIONS}                                                         ∂
  203.         -rt {FLOCResourceType}={FLOCResourceID}                             ∂
  204.         -ra {FLOCDescription}={FLOCRsrcAttributes}                             ∂
  205.         -m {FLOCEntrypoint}                                                 ∂
  206.         -sg {FLOCDescription}                                                 ∂
  207.         {FLOCObjects}                                                         ∂
  208.         {CTBLibraries}                                                         ∂
  209.         {OBJECTFOLDER}StandardLibrary                                        ∂
  210.         -o {ProjectName}
  211.  
  212.  
  213. ###############################################################################
  214. #                            FSCR build rules
  215. ###############################################################################
  216. FSCREntrypoint =             FSCR
  217. FSCRDescription =            "Code-Scripting"
  218. FSCRResourceType =            fscr
  219. FSCRResourceID =            1
  220. #AttrChoices =                 "resSysHeap,resPurgeable,resLocked,resProtected,resPreload,resChanged"
  221. FSCRRsrcAttributes =         "resLocked"
  222. #
  223. #    This rule makes sure that the load gets compiled before the code
  224. {ObjectFolder}FSCR.c.o            ƒ        {ObjectFolder}Load.c.o Globals.h
  225. #
  226. #    NOTE - The entry point file must be first in this list.
  227. FSCRObjects =                                                                 ∂
  228.                             {ObjectFolder}FSCR.c.o                            ∂
  229.                             {ObjectFolder}Load.c.o
  230. FSCRDependencies =                                                            ∂
  231.                             MakeFile                                        ∂
  232.                             {FSCRObjects}                                    ∂
  233.                             {CTBLibraries}                                    ∂
  234.                             {StandardDependencies}
  235. #
  236. #
  237. {ProjectName}                ƒƒ        {FSCRDependencies}
  238.     Link {LINKOPTIONS}                                                         ∂
  239.         -rt {FSCRResourceType}={FSCRResourceID}                             ∂
  240.         -ra {FSCRDescription}={FSCRRsrcAttributes}                             ∂
  241.         -m {FSCREntrypoint}                                                 ∂
  242.         -sg {FSCRDescription}                                                 ∂
  243.         {FSCRObjects}                                                         ∂
  244.         {CTBLibraries}                                                         ∂
  245.         {OBJECTFOLDER}StandardLibrary                                        ∂
  246.         -o {ProjectName}
  247.  
  248.  
  249. ###############################################################################
  250. #                            FSET build rules
  251. ###############################################################################
  252. FSETEntrypoint =             FSET
  253. FSETDescription =            "Code-Setup"
  254. FSETResourceType =            fset
  255. FSETResourceID =            1
  256. #AttrChoices =                 "resSysHeap,resPurgeable,resLocked,resProtected,resPreload,resChanged"
  257. FSETRsrcAttributes =         "resLocked"
  258. #
  259. #    This rule makes sure that the load gets compiled before the code
  260. {ObjectFolder}FSET.c.o            ƒ        {ObjectFolder}Load.c.o Globals.h
  261. #
  262. #    NOTE - The entry point file must be first in this list.
  263. FSETObjects =                                                                 ∂
  264.                             {ObjectFolder}FSET.c.o                            ∂
  265.                             {ObjectFolder}Load.c.o
  266. FSETDependencies =                                                            ∂
  267.                             MakeFile                                        ∂
  268.                             {FSETObjects}                                    ∂
  269.                             {CTBLibraries}                                    ∂
  270.                             {StandardDependencies}
  271. #
  272. #
  273. {ProjectName}                ƒƒ        {FSETDependencies}
  274.     Link {LINKOPTIONS}                                                         ∂
  275.         -rt {FSETResourceType}={FSETResourceID}                             ∂
  276.         -ra {FSETDescription}={FSETRsrcAttributes}                             ∂
  277.         -m {FSETEntrypoint}                                                 ∂
  278.         -sg {FSETDescription}                                                 ∂
  279.         {FSETObjects}                                                         ∂
  280.         {CTBLibraries}                                                         ∂
  281.         {OBJECTFOLDER}StandardLibrary                                        ∂
  282.         -o {ProjectName}
  283.  
  284.  
  285. ###############################################################################
  286. #                            FVAL build rules
  287. ###############################################################################
  288. FVALEntrypoint =             FVAL
  289. FVALDescription =            "Code-Validation"
  290. FVALResourceType =            fval
  291. FVALResourceID =            1
  292. #AttrChoices =                 "resSysHeap,resPurgeable,resLocked,resProtected,resPreload,resChanged"
  293. FVALRsrcAttributes =         "resLocked"
  294. #
  295. #    This rule makes sure that the load gets compiled before the code
  296. {ObjectFolder}FVAL.c.o            ƒ        {ObjectFolder}Load.c.o Globals.h
  297. #
  298. #    NOTE - The entry point file must be first in this list.
  299. FVALObjects =                                                                 ∂
  300.                             {ObjectFolder}FVAL.c.o                            ∂
  301.                             {ObjectFolder}Validation.c.o                    ∂
  302.                             {ObjectFolder}Load.c.o
  303. FVALDependencies =                                                            ∂
  304.                             MakeFile                                        ∂
  305.                             {FVALObjects}                                    ∂
  306.                             {CTBLibraries}                                    ∂
  307.                             {StandardDependencies}
  308. #
  309. #
  310. {ProjectName}                ƒƒ        {FVALDependencies}
  311.     Link {LINKOPTIONS}                                                         ∂
  312.         -rt {FVALResourceType}={FVALResourceID}                             ∂
  313.         -ra {FVALDescription}={FVALRsrcAttributes}                             ∂
  314.         -m {FVALEntrypoint}                                                 ∂
  315.         -sg {FVALDescription}                                                 ∂
  316.         {FVALObjects}                                                         ∂
  317.         {CTBLibraries}                                                         ∂
  318.         {OBJECTFOLDER}StandardLibrary                                        ∂
  319.         -o {ProjectName}
  320.  
  321.  
  322. ###############################################################################
  323. #                            Other resource rules
  324. ###############################################################################
  325. ResourceDependencies =                                                        ∂
  326.                             MakeFile                                        ∂
  327.                             {ConstantFileNm}                                ∂
  328.                             {PrebuiltFileNm}                                ∂
  329.                             Resources.r
  330. #
  331. #
  332. {ProjectName}                ƒƒ        {ResourceDependencies}
  333.     Set ConstantsFileName {ConstantFileNm}
  334.     Export ConstantsFileName
  335.     #
  336.     Set PrebuiltResourceFileName {PrebuiltFileNm}
  337.     Export PrebuiltResourceFileName
  338.     #
  339.         Rez {REZOPTIONS} Resources.r -o {ProjectName}
  340.     #
  341.     Unset PrebuiltResourceFileName
  342.     Unset ConstantsFileName
  343.  
  344.  
  345. ###############################################################################
  346. #                                Final step
  347. ###############################################################################
  348. ToolType =                     'fbnd'
  349. ToolCreator =                'ctbf'
  350. #
  351. FinalDependencies =                                                            ∂
  352.                             MakeFile                                        ∂
  353.                             {ResourceDependencies}                            ∂
  354.                             {FDEFObjects}                                    ∂
  355.                             {FLOCObjects}                                    ∂
  356.                             {FSCRObjects}                                    ∂
  357.                             {FSETObjects}                                    ∂
  358.                             {FVALObjects}
  359. #
  360. #
  361. {ProjectName}                ƒƒ        {FinalDependencies}
  362.     OrphanFiles {ProjectName} ∑ Dev:NULL
  363.     SetFile -a Bi -t {ToolType} -c {ToolCreator} {ProjectName}
  364.     Duplicate -y -p {ProjectName} "{systemfolder}Extensions:"
  365.  
  366.  
  367.  
  368. ###############################################################################
  369. #                                Cleanup
  370. ###############################################################################
  371. #
  372. Clean                            ƒ        "{Worksheet}"
  373.         Set Echo 0 && ∂
  374.         Set saveExit {Exit} && ∂
  375.         Set exit 0 && ∂
  376.         If `Exists {ProjectName}`
  377.             Delete -y {ProjectName}
  378.         End
  379.         Delete -y `Files {ObjectFolder}≈` ∑∑ Dev:Null
  380.         Set exit {saveExit} && ∂
  381.         Set Echo 1
  382.  
  383.  
  384.  
  385. ###############################################################################
  386. #                                Load.Dump
  387. ###############################################################################
  388. #
  389. {ObjectFolder}Load.Dump            ƒ        Load.c
  390.  
  391.  
  392.  
  393. ###############################################################################
  394. #                                StandardLibrary
  395. ###############################################################################
  396. #
  397. {ObjectFolder}StandardLibrary    ƒ        {MacLibraries}
  398.         Lib                                                             ∂
  399.                 {LIBOPTIONS}                                            ∂
  400.                 -d                                                        ∂
  401.                 {MacLibraries}                                             ∂
  402.                 -o "{Targ}"                    
  403.  
  404.  
  405.  
  406. ###############################################################################
  407. #                                Default rules
  408. ###############################################################################
  409. #
  410. {ObjectFolder}    ƒ    ":"
  411. #
  412. .c.o                            ƒ        .c .h
  413.     C         {DepDir}{Default}.c {COPTIONS} -o {Targ}
  414.     
  415. .p.o                            ƒ        .p
  416.     Pascal    {DepDir}{Default}.p {POPTIONS} -o {Targ}
  417.  
  418. .a.o                            ƒ        .a .h
  419.     Asm         {DepDir}{Default}.a {AOPTIONS} -o {Targ}
  420.